package inheritance;

public class Mankind {
    private int sex;
    private int salary;

    public Mankind(int sex, int salary) {
        this.sex = sex;
        this.salary = salary;
        System.out.println("super class construction2");
    }

    public Mankind() {
        System.out.println("super class construction1");
    }

    public void manOrWoman() {
        System.out.println("mankind");
        if (sex == 0){
            System.out.println("woman");
        }
        else{
            System.out.println("man");
        }
    }

    public void employeed() {
        if (salary ==0) {
            System.out.println("no job");
        }
        else{
            System.out.println("job");
        }
    }

}
